//
//  ActivityCurrentTotalItem.swift
//  DaRings
//
//  Created by 魔样科技 on 2022/10/31.
//

import Foundation
import MYModule
import UIKit

class ActivityCurrentTotalItem: StackView {

    override func makeUI() {
        super.makeUI()
        
        let subStack = StackView()
        subStack.axis = .horizontal
        subStack.alignment = .center
        subStack.contentMode = .center
        subStack.spacing = 6

        subStack.addArrangedSubview(self.imageView)
        self.imageView.snp.makeConstraints { make in
            make.width.height.equalTo(20)
        }
        subStack.addArrangedSubview(self.numLabel)
        
        self.spacing = 2
        self.axis = .vertical
        self.alignment = .center
        self.contentMode = .center

        self.addArrangedSubview(subStack)
        self.addArrangedSubview(unitLabel)
        
        self.numLabel.text = "--"
        self.unitLabel.text = ""
    }
    
    //MARK: - lazy load -
//    lazy var progressView: CircleView = {
//        let view = CircleView.init(frame: CGRect(x: 0, y: 0, width: 20, height: 20))
//        view.bgColor = UIColor.Step.theme.alpha(0.2)
//        view.strokeColor = UIColor.Step.theme
//        view.maximumValue = 100
//        view.value = 10
//        return view
//    }()
    
    lazy var imageView: ImageView = {
        let imageView = ImageView()
        imageView.contentMode = .scaleAspectFit
        return imageView
    }()

    lazy var numLabel: Label = {
        let label = Label()
        label.font = Fonts.boldSystemFont(ofSize: 22)
        label.textColor = UIColor.assist_222222
        label.textAlignment = .center
        return label
    }()
    
    lazy var unitLabel: Label = {
        let label = Label()
        label.font = Fonts.boldSystemFont(ofSize: 10)
        label.textColor = UIColor.assist_222222
        label.textAlignment = .center
        return label
    }()
}
